package cn.mengfly.fxtest.app.urltest;

import lombok.Data;

/**
 * @author Mengfly
 */
@Data
public class UrlTestObject {

    private final Integer statusCode;
    private final Integer loadTime;
    private final Boolean wasError;
    private String errorMessage;

    public UrlTestObject(Integer statusCode, Integer loadTime) {
        this.statusCode = statusCode;
        this.loadTime = loadTime;
        this.wasError = false;
        this.errorMessage = "";
    }

    public UrlTestObject(String errorMessage) {
        this.statusCode = null;
        this.loadTime = null;
        wasError = true;
        this.errorMessage = errorMessage;
    }

}
